﻿using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Abp.Domain.Entities.Auditing;
using Hangfire.Annotations;

namespace Hicap.AuthorizationServer.Core.Models
{
    public class Company : FullAuditedEntity
    {
        public bool IsActive { get; set; } = true;

        /// <summary>
        /// 公司id
        /// </summary>
        [Required]
        public string CompanyCode { get; set; }

        /// <summary>
        /// 公司Name
        /// </summary>
        [Required]
        public string CompanyName { get; set; }

        /// <summary>
        /// 公司Name
        /// </summary>
        [Required]
        public int? CompanyType { get; set; }

        /// <summary>
        /// 是否认证
        /// </summary>
        public bool IsCertified { get; set; }

        /// <summary>
        /// 营业执照
        /// </summary>
        [Required]
        public string License { get; set; }

        [ForeignKey("Company")]
        [CanBeNull]
        public int? ParenCompanyId { get; set; }

        public virtual Company ParenCompany { get; set; }

        public string CompanyLogo { get; set; }
    }
}